package main

import (
	"fmt"
	"gowork/blockChain/block"
	"gowork/blockChain/chain"
	//"strconv"
)

func main() {
	firstBlock := block.GenerateFirstBlock("创世区块")
	fmt.Println(firstBlock)
	secondBlock := block.GenerateNextBlock("新区块", firstBlock)
	fmt.Println(secondBlock)

	fmt.Println("----------------------------------------------------------------")

	header := chain.GreateHeaderNode(&firstBlock)
	//secondChain := 
	chain.AddNote(&secondBlock, header)

	// newBlock := block.GenerateNextBlock("0区块", secondBlock)
	// newChain := chain.AddNote(&secondBlock, secondChain)

	// for i:=1; i<11; i++ {
	// 	newBlock = block.GenerateNextBlock(strconv.Itoa(i)+"区块", newBlock)
	// 	newChain = chain.AddNote(&newBlock, newChain)
	// }
	
	chain.ShowNodes(header)

}